<link rel="stylesheet" type="text/css" href="./css/main.css"/>
<link rel="stylesheet" type="text/css" href="./css/nav.css"/>

<div id="container">
	{{include './header'}}
	{{include './aside'}}
   <div id="main">
     <h2>用户管理列表</h2>
        <button onclick="saveUser()">添加新用户</button>
	   <div id="userList">
		   <table border="1">
			 <tr>
			     <th>Id</th>
			     <th>userName</th>
			     <th>passWord</th>
			     <th>Age</th>
			     <th>Action</th>
			 </tr>
			{{each list}}
				<tr>
					<td>{{$value.id}}</td>
					<td>{{$value.username}}</td>
					<td>{{$value.password}}</td>
					<td>{{$value.age}}</td>
					<td>
					  <button onclick="editUser('{{$value.id}}')">修改用户</button>
					  <button onclick="deleteUser('{{$value.id}}')">删除用户</button>
					  <a href="#" class="edit">Edit</a>
					  <a href="#" class="del">Delete</a>
					</td>
				</tr>
			{{/each}}
		  </table>
		</div>
	{{include './saveUser'}}
	</div>
	{{include './sideBar'}}
	{{include './footer'}}
</div>